package com.example.designPatterns.state;

/**
 * @Title: AbstractOrderState
 * @Description: TODO
 * @Date 2021/9/30 9:53
 */
public abstract class AbstractOrderState {


    /**
     * 订单状态
     *
     * @return OrderStateEnum
     */
    public abstract OrderStateEnum orderState();


    /**
     * 具体操作,根据状态来进行操作
     *
     * @param context context
     * @param order   order
     */
    public void execute(OrderStateContext context, Order order) {
        throw new RuntimeException("该状态下不支持该操作");
    }
}
